#include "comm.hpp"

int main(){
    key_t k = getKey();
    // cout<<"client:k"<<k<<endl;
    printf("0x%x\n",k);
    int shmid = getShm(k,gsize);
    cout<<"client:id = "<<shmid<<endl;

    char* addr  = (char*)shmat(shmid,nullptr,0);

    //sleep(30);

    char arr[]="i am process A";
    int i=0;
    while(i<=sizeof(arr))
    {
        addr[i] = arr[i];
        i++;
    }


    shmdt(addr);
    return 0;
}